﻿using NewRetail.Application.Components.Goods.Entity;
using NewRetail.Application.Components.Platform.Entity;
using NewRetail.Application.Core;
using System;

namespace NewRetail.Application.Components.Platform.Model
{
    /// <summary>
    /// 销售按商品汇总统计报表查询条件
    /// </summary>
    public class QueryPosSaleSummaryStatisticsGoodDto
    {
        public DateTime? startTime { get; set; }
        public DateTime? endTime { get; set; }
        public string warehouseId { get; set; }
        public string cashierId { get; set; }
        public string cashierName { get; set; }
        public string goodsName { get; set; }
    }
    /// <summary>
    /// 销售按商品汇总统计报表查询条件，分页
    /// </summary>
    public class QueryPosSaleSummaryStatisticsGoodInputDto : PagingRequestDto
    {
        public DateTime? startTime { get; set; }
        public DateTime? endTime { get; set; }
        public string warehouseId { get; set; }
        public string cashierId { get; set; }
        public string cashierName { get; set; }
        public string goodsName { get; set; }
        public string goodsNo { get; set; }
        public string categoryId { get; set; }
        public string supplierId { get; set; }
    }

    /// <summary>
    /// 类别商品销售统计显示。针对门店
    /// </summary>
    public class PosSaleCategorySummaryStatisticsGoodShowDto
    {
        /// <summary>
        /// 门店id
        /// </summary>
        public string warehouseID { get; set; }
        /// <summary>
        /// 商品类别Id
        /// </summary>
        public string categoryID { get; set; }
        /// <summary>
        /// 商品类别名称
        /// </summary>
        public string categoryName { get; set; }
        /// <summary>
        /// 商品类别No
        /// </summary>
        public string categoryNo { get; set; }
        /// <summary>
        /// 销售数量
        /// </summary>
        public decimal saleQuantity { get; set; }
        /// <summary>
        /// 销售金额
        /// </summary>
        public decimal saleMoney { get; set; }
        /// <summary>
        /// 退货数量
        /// </summary>
        public decimal reSaleQuantity { get; set; }
        /// <summary>
        /// 退货金额
        /// </summary>
        public decimal reSaleMoney { get; set; }
        /// <summary>
        /// 数量小计
        /// </summary>
        public decimal totalSaleQuantity { get; set; }
        /// <summary>
        /// 金额小计
        /// </summary>
        public decimal totalSaleMoney { get; set; }
        /// <summary>
        /// Gd退货金额
        /// </summary>
        public decimal reGdAmount { get; set; }
        /// <summary>
        /// Gd金额小计
        /// </summary>
        public decimal totalGdSaleMoney { get; set; }
        /// <summary>
        /// Gd同店占比
        /// </summary>
        public double warehouseGdRate { get; set; }
        /// <summary>
        /// 毛利
        /// </summary>
        public decimal grossProfit { get; set; }
        /// <summary>
        /// 同店占比
        /// </summary>
        public double warehouseRate { get; set; }
        /// <summary>
        /// 门店
        /// </summary>
        public Warehouse.Entity.Warehouse Warehouse { get; set; }
        
    }
    /// <summary>
    /// 类别商品销售统计显示。针对收银员
    /// </summary>
    public class PosSaleCashierCategorySummaryStatisticsGoodShowDto : PosSaleCategorySummaryStatisticsGoodShowDto
    {
        /// <summary>
        /// 收银员id
        /// </summary>
        public string cashierID { get; set; }
        /// <summary>
        /// 收银员
        /// </summary>
        public PosCashier PosCashier { get; set; }
    }
    /// <summary>
    /// 销售按商品汇总显示
    /// </summary>
    public class PosSaleSummaryStatisticsGoodShowDto
    {
        /// <summary>
        /// 门店id
        /// </summary>
        public string warehouseID { get; set; }
        /// <summary>
        /// 供应商id
        /// </summary>
        public string supplierId { get; set; }
        /// <summary>
        /// 商品类别Id
        /// </summary>
        public string categoryID { get; set; }
        /// <summary>
        /// 商品类别名称
        /// </summary>
        public string categoryName { get; set; }
        /// <summary>
        /// 商品类别No
        /// </summary>
        public string categoryNo { get; set; }
        /// <summary>
        /// 商品id
        /// </summary>
        public string goodsID { get; set; }
        /// <summary>
        /// 商品/编码
        /// </summary>
        public string goodsNo { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string goodsName { get; set; }
        /// <summary>
        /// 销售数量
        /// </summary>
        public decimal saleQuantity { get; set; }
        /// <summary>
        /// 销售金额
        /// </summary>
        public decimal saleMoney { get; set; }
        /// <summary>
        /// 退货数量
        /// </summary>
        public decimal reSaleQuantity { get; set; }
        /// <summary>
        /// 退货金额
        /// </summary>
        public decimal reSaleMoney { get; set; }
        /// <summary>
        /// Gd退货金额
        /// </summary>
        public decimal reGdAmount { get; set; }
        /// <summary>
        /// Gd金额小计
        /// </summary>
        public decimal totalGdSaleMoney { get; set; }
        /// <summary>
        /// 数量小计
        /// </summary>
        public decimal totalSaleQuantity { get; set; }
        /// <summary>
        /// 金额小计
        /// </summary>
        public decimal totalSaleMoney { get; set; }
        /// <summary>
        /// 库存数量
        /// </summary>
        public decimal stockQuantity { get; set; }
        /// <summary>
        /// 门店
        /// </summary>
        public Warehouse.Entity.Warehouse Warehouse { get; set; }
        /// <summary>
        /// 供应商
        /// </summary>
        public Supplier Supplier { get; set; }
        public GoodsCategory rootCategory { get; set; }
        public GoodsCategory category { get; set; }
    }
}
